home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
c
/
jpl_c.zip
/
STRNCAT.C
< prev
next >
Wrap
Text File
|
1986-05-18
|
768b
|
29 lines
/* 1.0 07-06-84
************************************************************************
* Robert C. Tausworthe *
* Jet Propulsion Laboratory *
* Pasadena, CA 91009 1984 *
************************************************************************/
#include "defs.h"
#include "stdtyp.h"
/************************************************************************/
STRING
strncat(s1, s2, n) /* concatenate string s2 onto s1, but at most
n characters. Return pointer s1. */
/*----------------------------------------------------------------------*/
STRING s1, s2;
int n;
{
STRING p;
p = s1;
while (*s1 AND n > 0)
{ s1++;
n--;
}
strncpy(s1, s2, n);
return p;
}